﻿@model Model.ViewModel.Cost

@using (Ajax.BeginForm(
"CostAdd", "Cost",
new AjaxOptions
    {
        HttpMethod = "Post",
        OnComplete = "Ifok"
    },
new { role = "form", name = "nbform", id = "nbform", @class = "form-horizontal" }))
{
    <div class="form-group">
        <label for="UserName" class="col-sm-4 control-label">报销人：</label>
        <div class="col-sm-8">
            @Html.TextBoxFor(u => u.UserName, new { @class = "form-control", placeholder = "报销人" })
        </div>
    </div>
    <div class="form-group">
        <label for="CostClassID" class="col-sm-4 control-label">科目：</label>
        <div class="col-sm-8">
            @Html.DropDownList("CostClassID", @ViewData["CostClassID"] as SelectList, "--请选择--", new { @class = "form-control" })
        </div>
    </div>
    <div class="form-group">
        <label for="CostAmount" class="col-sm-4 control-label">金额：</label>
        <div class="col-sm-8">
            @Html.TextBoxFor(u => u.CostAmount, new { @class = "form-control", placeholder = "金额" })
           <span class="text-danger"> @Html.ValidationMessageFor(u => u.CostAmount)</span>
        </div>
    </div>
    
    <div class="form-group">
        <label for="CostDetail" class="col-sm-4 control-label">说明：</label>
        <div class="col-sm-8">
            @Html.TextAreaFor(u => u.CostDetail, new { @class = "form-control", rows = "3", placeholder = "详细说明" })
            </div>
        </div>
    <div class="form-group">
        <div class="col-sm-offset-4 col-sm-8">
            <button type="submit" class="btn btn-default">提交</button>
        </div>
    </div>
}


